beginobjectscript;

variables;

short did_summon = 0;

body;

beginstate INIT_STATE;
	break;

beginstate DEAD_STATE;

break;

beginstate START_STATE; 
	if (gf(71,2) == 0)
		end();
	if (did_summon > 0) {
		kill_object(ME,0);
		end();
		}
	if (get_nearest_char(2) >= 0) {
		did_summon = 1;

		spawn_creature(get_memory_cell(0));
		place_particle_num(get_memory_cell(0) + 8,10,7,10);
		set_level(get_memory_cell(0) + 8,30);
		set_boss_level(get_memory_cell(0) + 8,1);
		force_char_status(get_memory_cell(0) + 8,1,10);
				
		pc_heard_sound_delay(136,100);		

		print_str_color("A wingbolt bursts out of a vat!",3);
		if (gf(71,5) == 0) {
			sf(71,5,1);
			begin_talk_mode(6);
			}
		kill_object(ME,0);
		}
break;

beginstate 3;
	
break;

beginstate USE_STATE;
	print_str_color("Use: When you get close to the vat, the lid vibrates more.",2);
	print_str_color("  You back away.",2);
break;